package cn.wolfcode.consumer.helloconsumer;

import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

//@Component
@RocketMQMessageListener(
        topic = "01-boot",
        consumerGroup = "wolfcode-consumer",
//        messageModel = MessageModel.BROADCASTING
        messageModel = MessageModel.CLUSTERING
)
public class HelloConsumer1 implements RocketMQListener<MessageExt> {

    @Override
    public void onMessage(MessageExt messageExt) {
        System.out.println("B消费消息"+messageExt);
    }
}
